Integrand size = 23, antiderivative size = 117 \[ \int \frac {\sin ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\left (3 a^2+12 a b+8 b^2\right ) x}{8 a^3}-\frac {\sqrt {b} (a+b)^{3/2} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a^3 f}-\frac {(5 a+4 b) \cos (e+f x) \sin (e+f x)}{8 a^2 f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a f} \]
[Out]
Time = 0.20 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {4217, 481, 541, 536, 209, 211} \[ \int \frac {\sin ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=-\frac {\sqrt {b} (a+b)^{3/2} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a^3 f}-\frac {(5 a+4 b) \sin (e+f x) \cos (e+f x)}{8 a^2 f}+\frac {x \left (3 a^2+12 a b+8 b^2\right )}{8 a^3}+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 a f} \]
[In]
[Out]
Rule 209
Rule 211
Rule 481
Rule 536
Rule 541
Rule 4217
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right )^3 \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\cos ^3(e+f x) \sin (e+f x)}{4 a f}-\frac {\text {Subst}\left (\int \frac {a+b+(b-4 (a+b)) x^2}{\left (1+x^2\right )^2 \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{4 a f} \\ & = -\frac {(5 a+4 b) \cos (e+f x) \sin (e+f x)}{8 a^2 f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a f}+\frac {\text {Subst}\left (\int \frac {(a+b) (3 a+4 b)-b (5 a+4 b) x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{8 a^2 f} \\ & = -\frac {(5 a+4 b) \cos (e+f x) \sin (e+f x)}{8 a^2 f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a f}-\frac {\left (b (a+b)^2\right ) \text {Subst}\left (\int \frac {1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{a^3 f}+\frac {\left (3 a^2+12 a b+8 b^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{8 a^3 f} \\ & = \frac {\left (3 a^2+12 a b+8 b^2\right ) x}{8 a^3}-\frac {\sqrt {b} (a+b)^{3/2} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a^3 f}-\frac {(5 a+4 b) \cos (e+f x) \sin (e+f x)}{8 a^2 f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a f} \\ \end{align*}
Result contains complex when optimal does not.
Time = 1.38 (sec) , antiderivative size = 303, normalized size of antiderivative = 2.59 \[ \int \frac {\sin ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {(a+2 b+a \cos (2 (e+f x))) \sec ^2(e+f x) \left (\sqrt {b} \left (3 a^3+34 a^2 b+64 a b^2+32 b^3\right ) \arctan \left (\frac {\sec (f x) (\cos (2 e)-i \sin (2 e)) (-((a+2 b) \sin (f x))+a \sin (2 e+f x))}{2 \sqrt {a+b} \sqrt {b (\cos (e)-i \sin (e))^4}}\right ) (\cos (2 e)-i \sin (2 e))+\sqrt {b (\cos (e)-i \sin (e))^4} \left (a^2 (3 a+2 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )+\sqrt {b} \sqrt {a+b} \left (-2 a^2 e+12 a^2 f x+48 a b f x+32 b^2 f x-8 a (a+b) \sin (2 (e+f x))+a^2 \sin (4 (e+f x))\right )\right )\right )}{64 a^3 \sqrt {b} \sqrt {a+b} f \left (a+b \sec ^2(e+f x)\right ) \sqrt {b (\cos (e)-i \sin (e))^4}} \]
[In]
[Out]
Time = 1.26 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.02
method | result | size |
derivativedivides | \(\frac {-\frac {\left (a +b \right )^{2} b \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{a^{3} \sqrt {\left (a +b \right ) b}}+\frac {\frac {\left (-\frac {1}{2} a b -\frac {5}{8} a^{2}\right ) \tan \left (f x +e \right )^{3}+\left (-\frac {3}{8} a^{2}-\frac {1}{2} a b \right ) \tan \left (f x +e \right )}{\left (1+\tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\left (3 a^{2}+12 a b +8 b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{8}}{a^{3}}}{f}\) | \(119\) |
default | \(\frac {-\frac {\left (a +b \right )^{2} b \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{a^{3} \sqrt {\left (a +b \right ) b}}+\frac {\frac {\left (-\frac {1}{2} a b -\frac {5}{8} a^{2}\right ) \tan \left (f x +e \right )^{3}+\left (-\frac {3}{8} a^{2}-\frac {1}{2} a b \right ) \tan \left (f x +e \right )}{\left (1+\tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\left (3 a^{2}+12 a b +8 b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{8}}{a^{3}}}{f}\) | \(119\) |
risch | \(\frac {3 x}{8 a}+\frac {3 x b}{2 a^{2}}+\frac {x \,b^{2}}{a^{3}}+\frac {i {\mathrm e}^{2 i \left (f x +e \right )}}{8 a f}+\frac {i {\mathrm e}^{2 i \left (f x +e \right )} b}{8 a^{2} f}-\frac {i {\mathrm e}^{-2 i \left (f x +e \right )}}{8 a f}-\frac {i {\mathrm e}^{-2 i \left (f x +e \right )} b}{8 a^{2} f}+\frac {\sqrt {-a b -b^{2}}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b -b^{2}}+a +2 b}{a}\right )}{2 f \,a^{2}}+\frac {\sqrt {-a b -b^{2}}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b -b^{2}}+a +2 b}{a}\right ) b}{2 f \,a^{3}}-\frac {\sqrt {-a b -b^{2}}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b -b^{2}}-a -2 b}{a}\right )}{2 f \,a^{2}}-\frac {\sqrt {-a b -b^{2}}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b -b^{2}}-a -2 b}{a}\right ) b}{2 f \,a^{3}}+\frac {\sin \left (4 f x +4 e \right )}{32 a f}\) | \(342\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 332, normalized size of antiderivative = 2.84 \[ \int \frac {\sin ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\left [\frac {{\left (3 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} f x + 2 \, \sqrt {-a b - b^{2}} {\left (a + b\right )} \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{3} - b \cos \left (f x + e\right )\right )} \sqrt {-a b - b^{2}} \sin \left (f x + e\right ) + b^{2}}{a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}}\right ) + {\left (2 \, a^{2} \cos \left (f x + e\right )^{3} - {\left (5 \, a^{2} + 4 \, a b\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, a^{3} f}, \frac {{\left (3 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} f x + 4 \, \sqrt {a b + b^{2}} {\left (a + b\right )} \arctan \left (\frac {{\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b}{2 \, \sqrt {a b + b^{2}} \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) + {\left (2 \, a^{2} \cos \left (f x + e\right )^{3} - {\left (5 \, a^{2} + 4 \, a b\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, a^{3} f}\right ] \]
[In]
[Out]
\[ \int \frac {\sin ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\int \frac {\sin ^{4}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.17 \[ \int \frac {\sin ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=-\frac {\frac {{\left (5 \, a + 4 \, b\right )} \tan \left (f x + e\right )^{3} + {\left (3 \, a + 4 \, b\right )} \tan \left (f x + e\right )}{a^{2} \tan \left (f x + e\right )^{4} + 2 \, a^{2} \tan \left (f x + e\right )^{2} + a^{2}} - \frac {{\left (3 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} {\left (f x + e\right )}}{a^{3}} + \frac {8 \, {\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} a^{3}}}{8 \, f} \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.30 \[ \int \frac {\sin ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\frac {{\left (3 \, a^{2} + 12 \, a b + 8 \, b^{2}\right )} {\left (f x + e\right )}}{a^{3}} - \frac {8 \, {\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )}}{\sqrt {a b + b^{2}} a^{3}} - \frac {5 \, a \tan \left (f x + e\right )^{3} + 4 \, b \tan \left (f x + e\right )^{3} + 3 \, a \tan \left (f x + e\right ) + 4 \, b \tan \left (f x + e\right )}{{\left (\tan \left (f x + e\right )^{2} + 1\right )}^{2} a^{2}}}{8 \, f} \]
[In]
[Out]
Time = 18.78 (sec) , antiderivative size = 494, normalized size of antiderivative = 4.22 \[ \int \frac {\sin ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\mathrm {atanh}\left (\frac {9\,b^3\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^3\,b-3\,a^2\,b^2-3\,a\,b^3-b^4}}{32\,\left (\frac {13\,a\,b^4}{16}+\frac {25\,b^5}{32}+\frac {9\,a^2\,b^3}{32}+\frac {b^6}{4\,a}\right )}+\frac {b^4\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^3\,b-3\,a^2\,b^2-3\,a\,b^3-b^4}}{4\,\left (\frac {9\,a^3\,b^3}{32}+\frac {13\,a^2\,b^4}{16}+\frac {25\,a\,b^5}{32}+\frac {b^6}{4}\right )}\right )\,\sqrt {-b\,{\left (a+b\right )}^3}}{a^3\,f}-\frac {\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (3\,a+4\,b\right )}{8\,a^2}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (5\,a+4\,b\right )}{8\,a^2}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^4+2\,{\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}-\frac {\mathrm {atan}\left (\frac {159\,b^3\,\mathrm {tan}\left (e+f\,x\right )}{256\,\left (\frac {27\,a\,b^2}{256}+\frac {159\,b^3}{256}+\frac {75\,b^4}{64\,a}+\frac {29\,b^5}{32\,a^2}+\frac {b^6}{4\,a^3}\right )}+\frac {75\,b^4\,\mathrm {tan}\left (e+f\,x\right )}{64\,\left (\frac {159\,a\,b^3}{256}+\frac {75\,b^4}{64}+\frac {27\,a^2\,b^2}{256}+\frac {29\,b^5}{32\,a}+\frac {b^6}{4\,a^2}\right )}+\frac {29\,b^5\,\mathrm {tan}\left (e+f\,x\right )}{32\,\left (\frac {75\,a\,b^4}{64}+\frac {29\,b^5}{32}+\frac {159\,a^2\,b^3}{256}+\frac {27\,a^3\,b^2}{256}+\frac {b^6}{4\,a}\right )}+\frac {b^6\,\mathrm {tan}\left (e+f\,x\right )}{4\,\left (\frac {27\,a^4\,b^2}{256}+\frac {159\,a^3\,b^3}{256}+\frac {75\,a^2\,b^4}{64}+\frac {29\,a\,b^5}{32}+\frac {b^6}{4}\right )}+\frac {27\,b^2\,\mathrm {tan}\left (e+f\,x\right )}{256\,\left (\frac {27\,b^2}{256}+\frac {159\,b^3}{256\,a}+\frac {75\,b^4}{64\,a^2}+\frac {29\,b^5}{32\,a^3}+\frac {b^6}{4\,a^4}\right )}\right )\,\left (a^2\,3{}\mathrm {i}+a\,b\,12{}\mathrm {i}+b^2\,8{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,a^3\,f} \]
[In]
[Out]